package com.googlecode.lightest.core

/**
 * The behavior is TaskNode differs from Node only in that children() will
 * never include value() in the resulting NodeList. That was a curious decision
 * for the implementation of Node.
 */
class TaskNode extends Node {

    TaskNode(Node parent, Object name) {
        super(parent, name)
    }

    TaskNode(Node parent, Object name, Object value) {
        super(parent, name, value)
    }

    TaskNode(Node parent, Object name, Map attributes) {
        this(parent, name, attributes)
    }

    TaskNode(Node parent, Object name, Map attributes, Object value) {
        super(parent, name, attributes, value)
    }
     
    @Override
    List children() {
        def children = super.children()
        children.remove(value())
        return children
    }
}
